// custom-tab-bar/index.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {

    },

    /**
     * 组件的初始数据
     */
    data: {

    },

    /**
     * 组件的方法列表
     */
    methods: {

    }
})
Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#1c1c1b",
    fontWeight:'bold',
    "list": [
      {
        "current": 0,
        "pagePath": "/pages/index/index",
        "text": "首页",
        "iconPath": "/images/index.png",
        "selectedIconPath": "/images/indexa.png"
      },
      {
        "current": 1,
        "pagePath": "/pages/mine/mine",
        "text": "我的",
        "iconPath": "/images/mine.png",
        "selectedIconPath": "/images/minea.png"
      },
    ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const idx = e.currentTarget.dataset.index
      const path = e.currentTarget.dataset.path
      // this.setData({
      //   selected: idx
      // })
      wx.switchTab({
        url: path,
      });
    }
  }
})